<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>v-on:按键修饰符</title>

		<script src="../js/vue.js"></script>
	</head>

	<body>
		<div id="app">
			<input @keydown.enter="fun1()">
		</div>
	</body>
	<script>
		//view model
		new Vue({
			el: '#app',
			methods: {
			    fun1: function() {
					alert("回车");
				}
			}
		});
        /**
		 * Vue提供的按键修饰符
		 .enter
         .tab
         .delete (捕获 "删除" 和 "退格" 键)
         .esc
         .space
         .up
         .down
         .left
         .right
         .ctrl
         .alt
         .shift
         .meta
         */
	</script>

</html>